﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace PSE.Framework.Mail.Configuration
{
    public class MailConfigurationSection : ConfigurationSection
    {
        [ConfigurationProperty("from", IsRequired = false, DefaultValue = null)]
        public MailAddresConfiguration From
        {
            get
            {
                return (MailAddresConfiguration)this["from"];
            }
            set
            {
                this["from"] = value;
            }
        }

        [ConfigurationProperty("smtpServer", IsRequired = false, DefaultValue = null)]
        public SmtpServerConfiguration SmtpServer
        {
            get
            {
                return (SmtpServerConfiguration)this["smtpServer"];
            }
            set
            {
                this["smtpServer"] = value;
            }
        }

        [ConfigurationProperty("networkCredential", IsRequired = false, DefaultValue = null)]
        public NetworkCredentialConfiguration NetworkCredential
        {
            get
            {
                return (NetworkCredentialConfiguration)this["networkCredential"];
            }
            set
            {
                this["networkCredential"] = value;
            }
        }
    }
}
